import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
// import Login from '../views/Login.vue'
import Home from '../views/main/Main.vue'
// import PartyMain from '../views/PartyMain.vue'
// import RoleMain from '../views/RoleMain.vue'
import ElevatorMain from '@/views/elevator/ElevatorMain.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
        path: '/login',
        component: resolve => require(['@/views/Login.vue'], resolve),
        name: 'Login',
        hidden: true
    },
    {
        path: '/Home',
        // component: resolve => require(['@/views/Home.vue'], resolve),
        component: Home,
        name: 'Home',
        children: [
            { 
                path: '/ElevatorMain', 
                component: ElevatorMain, 
                name: '/ElevatorMain',
                children: [
                    { 
                        path: '/ElevatorList', 
                        component: resolve => require(['@/views/elevator/ElevatorList.vue'], resolve), 
                        name: '/ElevatorList' 
                    }
                ]
            },
            { 
                path: '/MonitorMain', 
                component: resolve => require(['@/views/monitor/MonitorMain.vue'], resolve), 
                name: '/MonitorMain' ,
                children: [
                    { 
                        path: '/MonitorList', 
                        component: resolve => require(['@/views/monitor/MonitorList.vue'], resolve), 
                        name: '/MonitorList' 
                    },
                    { 
                        path: '/MonitorGrid', 
                        component: resolve => require(['@/views/monitor/MonitorGrid.vue'], resolve), 
                        name: '/MonitorGrid' 
                    },
                    { 
                        path: '/MonitorDetail', 
                        component: resolve => require(['@/views/monitor/MonitorDetail.vue'], resolve), 
                        name: '/MonitorDetail' 
                    },
                ]
            }
        ]
    }
  ]
})
